/*
 * Copyright (c) 2021, Beijing Yonyou Audit Software. All rights reserved.
 *
 */
package proxy.dynamicProxy;

/**
 * @author Clannad
 * @Date 2021-11-22
 */
public class TestProxy {
    public static void main(String[] args) {
        ProxyHandler handler = new ProxyHandler();
        Subject subject = (Subject) handler.newProxyInstance(new ConcreteSubject());
        subject.request();
        subject.eat();
        Subject subject1 = (Subject) handler.newProxyInstance(new SecondProxy());
        subject1.eat();
        subject1.eat();
    }
}
